//
//  Util.h
//  Cloud189
//
//  Created by Liam on 11-10-27.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AssetsLibrary/AssetsLibrary.h>

#define AutoresizingMaskFull \
							UIViewAutoresizingFlexibleWidth | \
							UIViewAutoresizingFlexibleHeight

@interface Util : NSObject {

}

+ (UIViewController*)viewController:(UIView*)view;
+ (UIViewController*)rootViewController;
+ (UIWindow*)mainWindow;

+ (void)showToastIfNeededWithAPIError:(NSError *)error;

+ (NSString *)appDataDirectory;
+ (NSString *)currentUserAppDataDirectory;

//+ (NSString *)currentUserDocumentDirectory;
//+ (NSString *)appDataDirectory;
//+ (NSString *)currentUserAppDataDirectory;
//+ (void)clearCache;
//+ (void)clearAppData;
//
//+ (UIAlertView *)showAlert:(NSString *)message withTitle:(NSString *)title cancelButtonTitle:(NSString *)cancelButtonTitle;
//+ (UIAlertView *)showAlert:(NSString *)message withTitle:(NSString *)title;
//
//+ (long long)GBFromLonglongBytes:(long long)bytes;
//+ (double)GBFromFloatBytes:(double)bytes;
//+ (double)ratioForUsedSpace:(long long)used forCapacity:(long long)capacity;
//
//+ (BOOL)viewController:(UIViewController *)viewController shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
//+ (NSUInteger)supportedInterfaceOrientationsWithController:(UIViewController *)controller;
//
//+ (NSArray *)getDataCounters;
//
//+ (UIImage *)getSegmentedImage:(UISegmentedControl *)segmentedControl withImages:(NSArray *)images andColors:(NSArray *)colors;
//
//+ (UIImage *)imageWithName:(NSString *)imageName;
//
//+ (NSURL *)iconCacheURL:(NSString *)hash withSuffix:(NSString *)suffix;
//
//+ (ALAsset *)assetForURL:(NSURL *)url withLibrary:(ALAssetsLibrary *)assetsLibrary;

@end
